from mako import runtime, filters, cache
UNDEFINED = runtime.UNDEFINED
_magic_number = 2
_modified_time = 1212607126.2761719
_template_filename='/home/andi/devel/python/pylons/votafam-ng/votafam/votafam/templates/admin/lista_votacoes.mako'
_template_uri='/admin/lista_votacoes.mako'
_template_cache=cache.Cache(__name__, _modified_time)
_source_encoding='utf-8'
_exports = ['sim_nao']


def _mako_get_namespace(context, name):
    try:
        return context.namespaces[(__name__, name)]
    except KeyError:
        _mako_generate_namespaces(context)
        return context.namespaces[(__name__, name)]
def _mako_generate_namespaces(context):
    pass
def _mako_inherit(template, context):
    _mako_generate_namespaces(context)
    return runtime._inherit_from(context, '/admin.mako', _template_uri)
def render_body(context,**pageargs):
    context.caller_stack.push_frame()
    try:
        __M_locals = dict(pageargs=pageargs)
        h = context.get('h', UNDEFINED)
        c = context.get('c', UNDEFINED)
        def sim_nao(sn):
            return render_sim_nao(context.locals_(__M_locals),sn)
        # SOURCE LINE 2
        context.write(u'\n')
        # SOURCE LINE 9
        context.write(u'\n<p style="text-align: center"><span class="destak">Vota&ccedil;&otilde;es</span></p>\n')
        # SOURCE LINE 11
        context.write(unicode(h.form(h.url(action='',id=None),method='post')))
        context.write(u'\n<div id="list" class="inner_context">\n  <table class="tablelist" width="100%" cellpadding="0" cellmargin="0">    \n    <tbody class="ligth_gray">\n      <tr>\n        <td align="right" width="30%">Mostrar vota&ccedil;&otilde;es do dia</td>\n        <td width="*">')
        # SOURCE LINE 17
        context.write(unicode(h.text_field('dt',class_='ed',size='10',value=c.dt or h.str_date(h.today()))))
        context.write(u' (dd/mm/aaaa)</td>\n      </tr>\n    </tbody>\n  </table>\n<br/>\n')
        # SOURCE LINE 22
        context.write(unicode(h.submit(value=' Mostrar ',class_='ed')))
        context.write(u'\n</div>\n')
        # SOURCE LINE 24
        context.write(unicode(h.end_form()))
        context.write(u'\n<br/>\n<div id="list" class="inner_context">\n<span class="destak">[</span><a href="')
        # SOURCE LINE 27
        context.write(unicode(h.url_for(action='edit',id=None)))
        context.write(u'">Adicionar</a><span class="destak">]</span>\n  <table class="tablelist" width="100%" cellpadding="0" cellmargin="0">    \n    <thead>\n      <tr>\n        <th width="10%" align="left">Data</th>\n        <th width="75%" align="left">Mostra</th>\n        <th width="15%">Ativo</th>\n      </tr>\n    </thead>\n    <tbody class="ligth_gray">\n')
        # SOURCE LINE 37
        if c.list:
            # SOURCE LINE 38
            for votacao in c.list:
                # SOURCE LINE 39
                context.write(u'        <tr>\n          <td>')
                # SOURCE LINE 40
                context.write(unicode(h.str_date(votacao.dtvotacao)))
                context.write(u'</td>\n          <td><a href="')
                # SOURCE LINE 41
                context.write(unicode(h.url_for(action='edit',id=votacao.cdvotacao)))
                context.write(u'">')
                context.write(unicode(votacao.r_mostra.nmmostra))
                context.write(u'</a></td>\n          <td><span class="destak">[</span><a href="')
                # SOURCE LINE 42
                context.write(unicode(h.url_for(action='activate',id=votacao.cdvotacao)))
                context.write(u'">')
                context.write(unicode(sim_nao(votacao.flativa)))
                context.write(u'</a><span class="destak">]</span></td>\n        </tr>\n')
        # SOURCE LINE 46
        context.write(u'    </tbody>\n  </table>\n</div>\n')
        return ''
    finally:
        context.caller_stack.pop_frame()


def render_sim_nao(context,sn):
    context.caller_stack.push_frame()
    try:
        # SOURCE LINE 3
        context.write(u'\n')
        # SOURCE LINE 4
        if sn == 0:
            # SOURCE LINE 5
            context.write(u'N&atilde;o\n')
            # SOURCE LINE 6
        else:
            # SOURCE LINE 7
            context.write(u'Sim\n')
        return ''
    finally:
        context.caller_stack.pop_frame()


